<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html" template="../template_back.xhtml">
  
  <ui:define name="content">
  	<h1>Ajout d'un client</h1>
  
    <h:form id="contentForm"  enctype="multipart/form-data">
      <h:panelGrid columns="3">
        <h:outputText value="Login" />        
        <p:inputText id="login" value="#{clientController.registerForm.login}" required="true" />
        <h:message for="login"></h:message>
        
        <h:outputText value="Mot de passe" />        
        <h:inputSecret id="password" value="#{clientController.registerForm.password}" required="true" />
        <h:message for="password"></h:message>

     	<h:outputLabel for="nom" value="Nom" />
     	<p:inputText id="nom" value="#{clientController.registerForm.nom}" required="true" disabled="false"/>
		<h:message for="nom"></h:message>

     	
     	<h:outputLabel for="prenom" value="Prenom" />
     	<p:inputText id="prenom" value="#{clientController.registerForm.prenom}" required="true" disabled="false" />
     	<h:message for="prenom"></h:message>
     		     	
     	<h:outputLabel for="email" value="email" />
     	<p:inputText id="email" value="#{clientController.registerForm.email}" required="true" disabled="false" />
     	<h:message for="email"></h:message>
     	
     	<h:outputLabel for="adresse" value="adresse" />
     	<p:inputText id="adresse" value="#{clientController.registerForm.adresse}" required="true" disabled="false" />
		<h:message for="adresse"></h:message>

     	<h:outputLabel for="telephone" value="Téléphone" />
     	<p:inputText id="telephone" value="#{clientController.registerForm.telephone}" required="true" disabled="false" />
		<h:message for="telephone"></h:message>

		<p:fileUpload value="#{clientController.file}" mode="simple" />
        
      </h:panelGrid>
      <p:commandButton action="#{clientController.register}" value="Enregistre le client"/>
      <h:messages globalOnly="true"/>
      
    </h:form>  
  
  </ui:define>
  
</ui:composition>
